package org.example.backend.repository;

import org.example.backend.entity.AnimalCategory;
import org.example.backend.entity.User;
import org.example.backend.entity.UserPreference;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface UserPreferenceRepository extends JpaRepository<UserPreference, Long> {
    List<UserPreference> findByUser(User user);
    List<UserPreference> findByUserId(Long userId);
    boolean existsByUserAndCategory(User user, AnimalCategory category);
    void deleteByUserAndCategory(User user, AnimalCategory category);
    void deleteByUser(User user);
    void deleteByUserAndCategoryId(User user, Long categoryId);
} 